<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="generator" content="ApiGen 2.8.0" />

	<title>Class Routers | sweetphp</title>

	<script type="text/javascript" src="resources/combined.js?2802521858"></script>
	<script type="text/javascript" src="elementlist.js?3776638906"></script>
	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360" />

</head>

<body>
<div id="left">
	<div id="menu">
		<a href="index.html" title="Overview"><span>Overview</span></a>


		<div id="groups">
			<h3>Packages</h3>
			<ul>
				<li><a href="package-PHP.html">PHP</a>
						</li>
				<li class="active"><a href="package-SweetPHP.html">SweetPHP<span></span></a>
						<ul>
				<li class="active"><a href="package-SweetPHP.System.html">System<span></span></a>
						<ul>
				<li class="active"><a href="package-SweetPHP.System.Core.html">Core</a>
						</li>
				<li><a href="package-SweetPHP.System.Test.html">Test</a>
						</li>
				<li><a href="package-SweetPHP.System.Utility.html">Utility</a>
						</li>
							</ul></li></ul></li>
			</ul>
		</div>

		<hr />


		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="class-DB.html">DB</a></li>
				<li><a href="class-DBInterage.html">DBInterage</a></li>
				<li><a href="class-Defaults.html">Defaults</a></li>
				<li><a href="class-Entity.html">Entity</a></li>
				<li><a href="class-InputIOPost.html">InputIOPost</a></li>
				<li><a href="class-Object.html">Object</a></li>
				<li><a href="class-Param.html">Param</a></li>
				<li><a href="class-Post.html">Post</a></li>
				<li><a href="class-Request.html">Request</a></li>
				<li class="active"><a href="class-Routers.html">Routers</a></li>
				<li><a href="class-Verify.html">Verify</a></li>
			</ul>





		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
<div id="rightInner">
	<form id="search">
		<input type="hidden" name="cx" value="" />
		<input type="hidden" name="ie" value="UTF-8" />
		<input type="text" name="q" class="text" />
		<input type="submit" value="Search" />
	</form>

	<div id="navigation">
		<ul>
			<li>
				<a href="index.html" title="Overview"><span>Overview</span></a>
			</li>
			<li>
				<a href="package-SweetPHP.System.Core.html" title="Summary of SweetPHP\System\Core"><span>Package</span></a>
			</li>
			<li class="active">
<span>Class</span>			</li>
		</ul>
		<ul>
			<li>
				<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
			</li>
		</ul>
		<ul>
		</ul>
	</div>

<div id="content" class="class">
	<h1>Class Routers</h1>


	<div class="description">
	
<p>Específica o caminho da página.</p>
<br />

<p>Exemplo: Ao chamar a página home, estarei instanciando a classe Home, para
acessar o index estarei acessando a function() -&gt; index. Dentro do index
deverá estar específicado o caminho da view.</p>
<br />

	</div>









	<div class="info">
		
		
		
		<b>Package:</b> <a href="package-SweetPHP.html">SweetPHP</a>\<a href="package-SweetPHP.System.html">System</a>\<a href="package-SweetPHP.System.Core.html">Core</a><br />

				<b>Copyright:</b>
				Copyright (c) 2013 - 2014, Ilines.<br />
				<b>Author:</b>
				sweetphp<br />
		<b>Located at</b> <a href="source-class-Routers.html#10-178" title="Go to source code">libs/system/core/Routers.php</a><br />
	</div>



	<table class="summary" id="methods">
	<caption>Methods summary</caption>
	<tr data-order="load" id="_load">

		<td class="attributes"><code>
			 public static
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_load">#</a>
		<code><a href="source-class-Routers.html#26-72" title="Go to source code">load</a>( )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			







		</div>
		</div></td>
	</tr>
	<tr data-order="getParam" id="_getParam">

		<td class="attributes"><code>
			 public static
			param
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getParam">#</a>
		<code><a href="source-class-Routers.html#74-114" title="Go to source code">getParam</a>( <span>mixed <var>$param</var> = -<span class="php-num">1</span></span> )</code>

		<div class="description short">
			
<p>Retorna a posição do valor da requisição get da URL.</p>

<p><br />
</p>

<p>Exemplo: URL de entrada <a
href="http://localhost/project/product/portables/pendrive/">http://localhost/project/product/portables/pendrive/</a></p>

<p>Instanciando o método:<br />
Routers::getParam(value);</p>

<p>Resultado:<br />
echo Routers::getParam(0) =&gt; 'product';<br />
echo Routers::getParam(1) =&gt; 'portables';<br />
echo Routers::getParam(2) =&gt; 'pendrive';</p>
<br />

		</div>

		<div class="description detailed hidden">
			
<p>Retorna a posição do valor da requisição get da URL.</p>

<p><br />
</p>

<p>Exemplo: URL de entrada <a
href="http://localhost/project/product/portables/pendrive/">http://localhost/project/product/portables/pendrive/</a></p>

<p>Instanciando o método:<br />
Routers::getParam(value);</p>

<p>Resultado:<br />
echo Routers::getParam(0) =&gt; 'product';<br />
echo Routers::getParam(1) =&gt; 'portables';<br />
echo Routers::getParam(2) =&gt; 'pendrive';</p>
<br />




				<h4>Returns</h4>
				<div class="list">
					<code>param</code><br>Parâmetro da URL<br />
				</div>


				<h4>Copyright</h4>
				<div class="list">
						Copyright (c) 2013 - 2014, Ilines.<br />
				</div>
				<h4>Author</h4>
				<div class="list">
						sweetphp<br />
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="changePage" id="_changePage">

		<td class="attributes"><code>
			 public static
			include
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_changePage">#</a>
		<code><a href="source-class-Routers.html#116-152" title="Go to source code">changePage</a>( <span>mixed <var>$param</var> = <span class="php-quote">&quot;&quot;</span></span>, <span>mixed <var>$parans</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
<p>Carrega as views do projeto conforme a página requisitada e espefícado no
controle do projeto na URL de entrada.</p>

<p><br />
</p>

<p>Exemplo: URL de entrada <a
href="http://localhost/project/home/">http://localhost/project/home/</a></p>
<br />
changePage('index_view', array());
<p>Resultado:</p>

		</div>

		<div class="description detailed hidden">
			
<p>Carrega as views do projeto conforme a página requisitada e espefícado no
controle do projeto na URL de entrada.</p>

<p><br />
</p>

<p>Exemplo: URL de entrada <a
href="http://localhost/project/home/">http://localhost/project/home/</a></p>
<br />
changePage('index_view', array());
<p>Resultado:</p>




				<h4>Returns</h4>
				<div class="list">
					<code>include</code><br>Inclui a pagina solicita<br />
				</div>


				<h4>Author</h4>
				<div class="list">
						sweetphp<br />
				</div>
				<h4>Example</h4>
				<div class="list">
						path '&lt;html&gt;&lt;head&gt;&lt;title&gt;Hello
Word!!!&lt;/title&gt;&lt;/head&gt;&lt;body&gt;Hello
Word!!!&lt;/body&gt;&lt;/html&gt;';<br />
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="ajax" id="_ajax">

		<td class="attributes"><code>
			 public static
			<code><a href="class-Routers.html#_ajax">Routers::ajax()</a></code>
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_ajax">#</a>
		<code><a href="source-class-Routers.html#154-176" title="Go to source code">ajax</a>( )</code>

		<div class="description short">
			
<p>Verifica se o tipo de entrada é 'xmlhttprequest'.</p>

<p><br />
</p>

		</div>

		<div class="description detailed hidden">
			
<p>Verifica se o tipo de entrada é 'xmlhttprequest'.</p>

<p><br />
</p>




				<h4>Returns</h4>
				<div class="list">
					<code><code><a href="class-Routers.html#_ajax">Routers::ajax()</a></code></code><br>Resultado do AJAX<br />
				</div>


				<h4>Copyright</h4>
				<div class="list">
						Copyright (c) 2013 - 2014, Ilines.<br />
				</div>
				<h4>Author</h4>
				<div class="list">
						sweetphp<br />
				</div>


		</div>
		</div></td>
	</tr>
	</table>


















</div>

	<div id="footer">
		sweetphp API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
	</div>
</div>
</div>
</body>
</html>
